$(function(){
	$.navigate = {
			setting:{
			 menu          : $("#navigate"),
			 sub_menu      : $("#navigate ul"),
			 menu_item     : $("#navigate > li > a"),
			 sub_menu_item : $("#navigate ul > li > a"),
			 only          : true,
			 content_id	   : "content_page"
			},
			
			init:function()
			{
				$setting = this.setting;
				this.addStyle();
				$setting.sub_menu.css({'display':'none'});
				$.navigate.toggleEvent();
				$.navigate.linkClickEvent();
			},
			addStyle:function(){},
			toggleEvent:function()
			{
				$setting = this.setting;
				$setting.menu_item.click(function(e){
					e.preventDefault();
					$(this).next().slideToggle('fast');
					return false;
				});
			},
			linkClickEvent:function(){
				$setting = this.setting;
				$setting.sub_menu_item.click(function(e){
					if($(this).attr("target")!="")
					{
						return true;
					}
					e.preventDefault();
					$href = $(this).attr("href");
					$.loadHtml($href,$setting.content_id);
					return false;
				});
			}
		};
		$.navigate.init();
})
	
	
	
